#include "../include/header.h"
int main(int argc, char* argv[]){
	ARGS_CHECK(argc, 2);

	close(STDIN_FILENO);
	int fd = open(argv[1], O_RDWR);
	ERROR_CHECK(fd, -1, "open");

	printf("fd = %d\n", fd);

	int num;
	scanf("%d", &num);
	printf("从文件中读到了%d\n", num);


	fflush(stdout);
	close(fd);

	return 0;
}